package com.vf.admin.miaodong.service.impl;

import com.vf.admin.common.splitpage.SplitPageBean;
import com.vf.admin.miaodong.dao.AfterCommentDao;
import com.vf.admin.miaodong.entity.AppComment;
import com.vf.admin.miaodong.service.AfterCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 动态评论
 */
@Service
public class AfterCommentServiceImpl implements AfterCommentService {

    @Autowired
    AfterCommentDao afterCommentDao;

    /**
     * 添加/修改
     */
    @Override
    public void saveOrUpdate(AppComment appComment) {
        afterCommentDao.saveOrUpdate(appComment);
    }

    @Override
    public List<AppComment> list(Map<String, Object> paramap, SplitPageBean splitPageBean) {
        return afterCommentDao.list(paramap, splitPageBean);
    }

    /**
     * 更新状态
     */
    @Override
    public void updateStatus(Integer id, Integer status) {
        afterCommentDao.updateStatus(id, status);
    }

    /**
     * 详情
     */
    @Override
    public AppComment get(Integer id) {
        return afterCommentDao.get(id);
    }

    /**
     * 删除
     */
    @Override
    public void del(Integer id) {
        afterCommentDao.del(id);
    }

    @Override
    public void pinglunNumUpdate(Integer id, Integer status) {
        afterCommentDao.pinglunNumUpdate(id, status);
    }
}
